package com.nuanshui.framework.middleware.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;

import com.rabbitmq.client.Channel;

public abstract class AbstractMessageHandler  implements ChannelAwareMessageListener{
	
	
	@Override
	public void onMessage(Message message, Channel channel) throws Exception {
		//MDC.put("unique",UniqueIdGenerator.generateRandomStr(10));
		messageHandler(message, channel);
	}
	
	public abstract void  messageHandler(Message message, Channel channel) throws Exception;

}
